<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>test.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script src="/js/json.js"></script>
	<script type="text/javascript">
	function showCar(){   
     	 alert('ok');
         var carr = new Car("Dodge", "Coronet R/T", 1968, "yellow");   
         alert(carr.toJSONString());   
     }   
       
     function Car(make, model, year, color){   
          this.make  =  make;   
          this.model  =  model;   
          this.year  =  year;   
          this.color  =  color;   
    }   
	function myEval() {   
       var str = '{ "name": "Violet", "occupation": "character" }';   
       var obj = eval('(' + str + ')');   
       alert(obj.toJSONString());   
 	}  
 	function myEval2() {   
     	var str = '{ "name": "Violet", "occupation": "character" }';   
     	var obj = str.parseJSON();   
     	alert(obj.toJSONString());   
	 }  
	</script>
  </head>
  
  <body>
    	<input type="button" onClick="showCar()" value="json4" >
     <input type="button" onClick="myEval()" value="json5" >
     <input type="button" onClick="myEval2()" value="json6" >
  </body>
</html>
